Skip to content

Conversation

@jayaddison
Copy link
Contributor

Feature or Bugfix

  • Refactoring

Purpose

  • Make it easier to write and run tests for the HTML search JavaScript code by extracting functions that can be called individually to parse queries and perform searches, without running any display/DOM-related logic.

Detail

  • Extract Search._parseQuery to transform a query into search terms.
  • Extract Search._performSearch to run a query and return results using search term arguments.
  • Update the test suite to use the newly-extracted functions.

Relates

@jayaddison
Copy link
Contributor Author

Awaits possible merge of #12102; moving into draft status until then.

@jayaddison jayaddison marked this pull request as draft March 22, 2024 14:29
@jayaddison
Copy link
Contributor Author

Awaits possible merge of #12102; moving into draft status until then.

It seems I've unintentionally merged most of this into #12102. I'll close this and merge the remainder too, so that there's only one PR to review. It could make sense to separate some of it out again, but to begin with a single PR should be less confusing I expect.

@jayaddison jayaddison closed this Mar 26, 2024
@jayaddison jayaddison deleted the refactor/extract-search-result-gathering branch March 26, 2024 11:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant